<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="utf-8"%>
<!doctype html>
<html>
 <head>
  <title>微信支付收银台</title>
  <meta name="keywords" content="关键字">
  <meta name="description" content="描述">
  <meta name="content-type" content="text/html;charset=UTF-8">
  
  <script src="../assets/plugins/jquery-1.10.2.min.js" type="text/javascript"></script>

	
 </head>

 <body>
	
<!-- 	<div align="center">
		<p >请注意，微信公众平台的授权目录一定要配置到这也页面所在的目录</p>
	</div> -->
	
	<div class="choose" >
	</div>
 </body>

 <script>
	 function onBridgeReady(){
		 WeixinJSBridge.invoke('getBrandWCPayRequest',{${finaPackage}},
				 function(res){
					 if(res.err_msg=='get_brand_wcpay_request:ok'){
						 alert("支付成功");
					 }else{
						 alert("支付失败");
					 }
					 window.location.href = '${url}';
				 });
	 }
	 if (typeof WeixinJSBridge == "undefined"){
		 if( document.addEventListener ){
			 document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
		 }else if (document.attachEvent){
			 document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
			 document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
		 }
	 }else{
		 onBridgeReady();
	 }
 </script>
</html>
